import request from '@/config/axios'

export interface QualityInspectReportTemplateVO {
  id: number
  templateNum: string
  templateName: string
  dictBelongProcess: number
  dictTemplateStatus: number
  templateVersion: number
  dictInspectType: number
}

// 查询订单管理-- 质量配置--检验报告模板列表
export const getQualityInspectReportTemplatePage = async (params) => {
  return await request.get({ url: `/config/quality-inspect-report-template/page`, params })
}

// 查询订单管理-- 质量配置--检验报告模板详情
export const getQualityInspectReportTemplate = async (id: number) => {
  return await request.get({ url: `/config/quality-inspect-report-template/get?id=` + id })
}

// 新增订单管理-- 质量配置--检验报告模板
export const createQualityInspectReportTemplate = async (data) => {
  return await request.post({ url: `/config/quality-inspect-report-template/create`, data })
}

// 修改订单管理-- 质量配置--检验报告模板
export const updateQualityInspectReportTemplate = async (data) => {
  return await request.put({ url: `/config/quality-inspect-report-template/update`, data })
}

// 删除订单管理-- 质量配置--检验报告模板
export const deleteQualityInspectReportTemplate = async (id: number) => {
  return await request.delete({ url: `/config/quality-inspect-report-template/delete?id=` + id })
}

// 导出订单管理-- 质量配置--检验报告模板 Excel
export const exportQualityInspectReportTemplate = async (params) => {
  return await request.download({ url: `/config/quality-inspect-report-template/export-excel`, params })
}

// 导出订单管理-- 质量配置--检验报告模板新增 Excel
export const exportQualityInspectReportEdit = async (params) => {
  return await request.download({ url: `/config/quality-inspect-report-template/conf/export-excel`, params })
}

// 删除订单管理-- 质量配置--检验报告模板子数据
export const deleteQualitytemplateConf= async (id: number) => {
  return await request.delete({ url: `/config/quality-inspect-report-template/conf/delete?id=` + id })
}
